Mathematics · 5 min read

Game Theory: Cooperation & Conflict

Two people, each deciding whether to trust the other, with no way to communicate first. It sounds like a philosophy riddle. It's actually math — and the math has a real, surprising answer about when cooperation beats betrayal, tested below with your own tournament.
The Default Library · Mathematics 6 of 20

Game theory is the mathematics of strategic decisions — situations where the best choice for you depends on what someone else chooses too, and they're thinking the same thing about you. It shows up everywhere once you notice it: two companies setting prices, two countries negotiating a treaty, two roommates deciding who does the dishes, two nations racing to arm or disarm. The cleanest version of the puzzle, and the one that unlocked the whole field, is called the Prisoner's Dilemma.

The dilemma

Two people are questioned separately about a crime. Each can stay silent (cooperate with their partner) or betray the other (defect) for a lighter sentence. The payoffs, in "points" where higher is better for you:

They cooperateThey defect
You cooperate3, 3 — both do well0, 5 — you're the sucker
You defect5, 0 — you win big1, 1 — both do poorly

Look closely and there's a trap: no matter what the other person does, you personally always score higher by defecting. If they cooperate, defecting gets you 5 instead of 3. If they defect, defecting gets you 1 instead of 0. Defection is the individually "rational" choice either way — mathematicians call this a dominant strategy. And yet, if both players follow that logic, they both end up at 1, 1 — worse than the 3, 3 they'd have gotten by both trusting each other. Individually rational choices produce a collectively worse outcome. That gap is the whole dilemma, and it's not a trick of this one puzzle — it's the mathematical skeleton underneath price wars, arms races, overfishing, and traffic jams.

Rational self-interest, applied by everyone, can leave everyone worse off than if they'd simply trusted each other. That single sentence explains a striking amount of the world's avoidable dysfunction.

Playing it once versus playing it forever

Here's the twist that changes everything: real relationships are rarely one-shot. You deal with the same coworker, neighbor, supplier, or country again and again. Once the game repeats, a new consideration enters — your reputation, and their memory of what you did last time. Robert Axelrod, a political scientist, tested this directly in the late 1970s: he invited game theorists to submit computer programs to compete in a repeated Prisoner's Dilemma round-robin, then ran the tournament and published the results. The winner was startling — not the most aggressive program, but one of the simplest.

Interactive · Run a tournament

Pick two strategies and play 20 rounds. Watch each round's move (🟩 cooperate, 🟥 defect) and see who actually wins.

Try Tit-for-Tat against Always Defect first, then against Always Cooperate, then against itself. The pattern that emerges is the entire lesson: Tit-for-Tat — cooperate first, then simply copy whatever the other side just did — never scores as high as a ruthless exploiter in any single match. But across a whole tournament of mixed opponents, it consistently comes out ahead, because it never gets repeatedly exploited (it retaliates immediately) and it never leaves cooperation on the table with a fellow cooperator (it forgives immediately once the other side stops defecting).

Why "nice but not naive" wins

Axelrod's actual tournament winner had four traits, and they're worth remembering well beyond game theory: it was nice (never defected first), retaliatory (punished defection immediately, so it couldn't be exploited repeatedly), forgiving (returned to cooperation the moment the other side did, rather than holding a permanent grudge), and clear (its behavior was easy for others to read and predict, which made cooperation with it easy to sustain). Notice this is a fairly good description of how trust actually works between reasonable people and institutions — quick to extend, quick to defend, quick to repair.

Nash equilibrium: when nobody wants to move

John Nash's contribution (yes, the mathematician of A Beautiful Mind) generalizes this idea past just two-player dilemmas: a Nash equilibrium is a state where no player can improve their own outcome by changing their strategy alone, given what everyone else is doing. Mutual defection in a one-shot Prisoner's Dilemma is a Nash equilibrium — not because it's good, but because neither player can unilaterally do better by switching while the other stays put. A lot of frustrating, seemingly irrational real-world standoffs — arms races, price wars, why nobody wants to be first to compromise — are actually stable Nash equilibria: individually reasonable, collectively stuck.

Where this actually shows up

Business. Two companies locked in a price war are playing a repeated Prisoner's Dilemma — both would profit more by holding prices steady, but each is tempted to undercut. International relations. Arms races, trade negotiations, and climate agreements are all repeated games where the "shadow of the future" (will we deal with each other again?) is what makes cooperation possible at all. Everyday life. Splitting a group bill, sharing a chore, tipping in a city you'll never return to — the length of the "shadow of the future" quietly explains why people behave differently in each case.

The takeaway

The Prisoner's Dilemma shows that individually rational choices can produce collectively worse outcomes — betrayal beats trust in any single encounter, even though mutual trust beats mutual betrayal. But once a game repeats, strategies that are nice, retaliatory, forgiving, and clear (Tit-for-Tat being the classic example) tend to outperform pure aggression over time, because reputation starts to matter. A Nash equilibrium is a stable outcome nobody can improve alone — which is why some bad situations, like arms races or price wars, persist even though everyone involved would prefer a different outcome.

Try this: run the tournament above with Tit-for-Tat against every other strategy, then ask where in your own life a relationship works like a repeated game — and whether your default strategy is nice, retaliatory, forgiving, and clear.

Sources & Further Reading

Sources. The payoff structure and the "nice, retaliatory, forgiving, clear" description of Tit-for-Tat's success come from Robert Axelrod's published computer tournaments (his book The Evolution of Cooperation, 1984). Nash equilibrium is standard game theory, formalized by John Nash (1950/1951). Match scores above are computed live from the stated payoff matrix, not pre-recorded.